home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{9FE255D1-F32E-11D0-9E15-444553540000}#1.0#0"; "MLISTX.OCX"
- Begin VB.Form Form1
- Caption = "List/X+ PutItems Sample"
- ClientHeight = 3315
- ClientLeft = 1755
- ClientTop = 2145
- ClientWidth = 7035
- LinkTopic = "Form1"
- PaletteMode = 1 'UseZOrder
- ScaleHeight = 3315
- ScaleWidth = 7035
- Begin MabryCtl.MList MList1
- Height = 2265
- Index = 3
- Left = 5280
- TabIndex = 3
- Top = 240
- Width = 1575
- _ExtentX = 2778
- _ExtentY = 3995
- Object.TabStop = -1 'True
- MousePointer = -842150451
- ColRowOrder = 0 'False
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- BeginProperty Columns {23BAA6DE-05A6-11D1-9E15-0020AFD6A9D5}
- ColumnCount = 2
- BeginProperty Column0 {23BAA6E0-05A6-11D1-9E15-0020AFD6A9D5}
- Object.Width = 50
- MinWidth = 0
- MaxWidth = -1
- UserResizeEnabled= -1
- Heading = "Col 1"
- Object.Visible = -1
- ColumnAlignment = 0
- HeadingAlignment= 0
- EndProperty
- BeginProperty Column1 {23BAA6E0-05A6-11D1-9E15-0020AFD6A9D5}
- Object.Width = 25
- MinWidth = 0
- MaxWidth = -1
- UserResizeEnabled= -1
- Heading = "Col 2"
- Object.Visible = -1
- ColumnAlignment = 0
- HeadingAlignment= 0
- EndProperty
- EndProperty
- End
- Begin MabryCtl.MList MList1
- Height = 2265
- Index = 2
- Left = 3600
- TabIndex = 2
- Top = 240
- Width = 1575
- _ExtentX = 2778
- _ExtentY = 3995
- Object.TabStop = -1 'True
- MousePointer = -842150451
- ColRowOrder = 0 'False
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- BeginProperty Columns {23BAA6DE-05A6-11D1-9E15-0020AFD6A9D5}
- ColumnCount = 2
- BeginProperty Column0 {23BAA6E0-05A6-11D1-9E15-0020AFD6A9D5}
- Object.Width = 50
- MinWidth = 0
- MaxWidth = -1
- UserResizeEnabled= -1
- Heading = "Col 1"
- Object.Visible = -1
- ColumnAlignment = 0
- HeadingAlignment= 0
- EndProperty
- BeginProperty Column1 {23BAA6E0-05A6-11D1-9E15-0020AFD6A9D5}
- Object.Width = 25
- MinWidth = 0
- MaxWidth = -1
- UserResizeEnabled= -1
- Heading = "Col 2"
- Object.Visible = -1
- ColumnAlignment = 0
- HeadingAlignment= 0
- EndProperty
- EndProperty
- End
- Begin MabryCtl.MList MList1
- Height = 2265
- Index = 1
- Left = 1920
- TabIndex = 1
- Top = 240
- Width = 1575
- _ExtentX = 2778
- _ExtentY = 3995
- Object.TabStop = -1 'True
- MousePointer = -842150451
- ColRowOrder = 0 'False
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- BeginProperty Columns {23BAA6DE-05A6-11D1-9E15-0020AFD6A9D5}
- ColumnCount = 2
- BeginProperty Column0 {23BAA6E0-05A6-11D1-9E15-0020AFD6A9D5}
- Object.Width = 50
- MinWidth = 0
- MaxWidth = -1
- UserResizeEnabled= -1
- Heading = "Col 1"
- Object.Visible = -1
- ColumnAlignment = 0
- HeadingAlignment= 0
- EndProperty
- BeginProperty Column1 {23BAA6E0-05A6-11D1-9E15-0020AFD6A9D5}
- Object.Width = 25
- MinWidth = 0
- MaxWidth = -1
- UserResizeEnabled= -1
- Heading = "Col 2"
- Object.Visible = -1
- ColumnAlignment = 0
- HeadingAlignment= 0
- EndProperty
- EndProperty
- End
- Begin MabryCtl.MList MList1
- Height = 2265
- Index = 0
- Left = 240
- TabIndex = 0
- Top = 240
- Width = 1575
- _ExtentX = 2778
- _ExtentY = 3995
- Object.TabStop = -1 'True
- MousePointer = -842150451
- ColRowOrder = 0 'False
- BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
- Name = "MS Sans Serif"
- Size = 8.25
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- BeginProperty Columns {23BAA6DE-05A6-11D1-9E15-0020AFD6A9D5}
- ColumnCount = 2
- BeginProperty Column0 {23BAA6E0-05A6-11D1-9E15-0020AFD6A9D5}
- Object.Width = 50
- MinWidth = 0
- MaxWidth = -1
- UserResizeEnabled= -1
- Heading = "Col 1"
- Object.Visible = -1
- ColumnAlignment = 0
- HeadingAlignment= 0
- EndProperty
- BeginProperty Column1 {23BAA6E0-05A6-11D1-9E15-0020AFD6A9D5}
- Object.Width = 25
- MinWidth = 0
- MaxWidth = -1
- UserResizeEnabled= -1
- Heading = "Col 2"
- Object.Visible = -1
- ColumnAlignment = 0
- HeadingAlignment= 0
- EndProperty
- EndProperty
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- Caption = "This sample shows how to use the PutItems method to quickly load List/X+ controls with large amounts of data."
- BeginProperty Font
- Name = "MS Sans Serif"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 495
- Left = 240
- TabIndex = 4
- Top = 2640
- Width = 6615
- End
- Attribute VB_Name = "Form1"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private Sub Form_Load()
- Dim str1d(1000) As String
- Dim str2d(1000, 1) As String
- Dim var2d(1000, 1) As Variant
- Dim rev2d(1, 1000) As Variant
- Dim r, c As Integer
- ' Load 1d string array
- For r = LBound(str1d) To UBound(str1d)
- str1d(r) = "Row " & r & MList1(0).ColDelimiter & "Col 2"
- Next
- ' Load 2d string array
- For r = LBound(str2d, 1) To UBound(str2d, 1)
- For c = LBound(str2d, 2) To UBound(str2d, 2)
- If (c = 0) Then
- str2d(r, c) = "Row " & r
- Else
- str2d(r, c) = "Col " & c + 1
- End If
- Next
- Next
- ' Load 2d variant array
- For r = LBound(var2d, 1) To UBound(var2d, 1)
- For c = LBound(var2d, 2) To UBound(var2d, 2)
- If (c = 0) Then
- var2d(r, c) = "Row " & r
- Else
- var2d(r, c) = "Col " & c + 1
- End If
- Next
- Next
- ' Load 2d variant array ordered (col, row)
- For c = LBound(rev2d, 1) To UBound(rev2d, 1)
- For r = LBound(rev2d, 2) To UBound(rev2d, 2)
- If (c = 0) Then
- rev2d(c, r) = "Row " & r
- Else
- rev2d(c, r) = "Col " & c + 1
- End If
- Next
- Next
- ' show form
- Me.Left = (Screen.Width - Me.ScaleWidth) / 2
- Me.Top = (Screen.Height - Me.ScaleHeight) * 2 / 5
- Me.Show
- DoEvents
- ' stuff em
- MList1(0).PutItems str1d
- DoEvents
- MList1(1).PutItems str2d
- DoEvents
- MList1(2).PutItems var2d
- DoEvents
- MList1(3).ColRowOrder = True
- MList1(3).PutItems rev2d
- End Sub
-